let numLiteral: number = 123;
let numObject: Number = new Number(123);
console.log(typeof numLiteral);
console.log(typeof numObject);
console.log(numLiteral.toFixed(2));//123.00
console.log(numObject.toExponential());//1.23e+2
console.log(numObject.toLocaleString());//123
console.log(numObject.toPrecision(2));//1.2e+2  四舍五入的算法
console.log(numObject.toString());//123   十进制
console.log(numObject.toString(8));//173  八进制
console.log(numObject.toString(2));//1111011 二进制
console.log(numObject.valueOf());//123

// Number 对象的使用建议
console.log(Number.MAX_VALUE);//1.7976931348623157e+308
console.log(Number.MIN_VALUE);//5e-324
console.log(Number.NaN);//NaN
console.log(Number.NEGATIVE_INFINITY);//-Infinity
console.log(Number.POSITIVE_INFINITY);//Infinity
console.log(Number.isNaN(123));//false
console.log(Number.isNaN("123"));//false
console.log(Number.isFinite(123));//true
console.log(Number.isFinite("123"));//false
console.log(Number.isInteger(123));//true
console.log(Number.isInteger("123"));//false
console.log(Number.parseInt("123"));//123
console.log(Number.parseFloat("123"));//123
console.log(Number.isSafeInteger(123));//true
console.log(Number.isSafeInteger("123"));//false
console.log(Number.EPSILON);//2.220446049250313e-16
console.log(Number.MAX_SAFE_INTEGER);//9007199254740991  示在 JavaScript 中可以安全地表示的最大整数
console.log(Number.MIN_SAFE_INTEGER);//-9007199254740991 表示在 JavaScript 中可以安全地表示的最小整数



